import * as actionTypes from './actionTypes'
import { fromJS } from 'immutable'
const defaultState = fromJS({
    focused: false,
    list: [],
    currentPage: 1,
    totalPage: 5,
    mouseIn: false
})
export default (state = defaultState, action) => {
    switch (action.type) {
        case actionTypes.INPUT_FOCUS:
            return state.set('focused', true);
        case actionTypes.INPUT_BLUR:
            return state.set('focused', false);
        case actionTypes.GET_SERCH_LIST:
            return state.set('list', action.data);
        case actionTypes.MOUSE_IN:
            return state.set('mouseIn', true);
        default:
            return state
    }
   
}